package com.ruitu.mall_98_2.mvp.contract;

import com.beanu.arad.base.BaseModel;
import com.beanu.arad.base.BasePresenter;
import com.beanu.arad.base.BaseView;
import com.ruitu.router_module.bean.api.BaseResult;
import com.ruitu.router_module.bean.mine.Coupon;
import com.ruitu.router_module.bean.order.CartSettlement;
import com.ruitu.router_module.bean.order.ConfirOrder;

import java.util.List;

import rx.Observable;

public interface CommitOrderContract {
    interface Model extends BaseModel {
        Observable<BaseResult<CartSettlement>> cartSettlement(String accountId, String ids, String addressId);

        Observable<BaseResult<List<Coupon>>> selectUseCoupons(String accountId, String userCouponIds, String goodId, String totalMoney, String companyId);

        Observable<BaseResult<ConfirOrder>> cartForOrder(String accountId, String ids, String addressId);
    }

    interface View extends BaseView {
        void setFails();

        void setSuc(CartSettlement commitOrders);

        void setCoupon(List<Coupon> coupons);

        void setForOrder(ConfirOrder confirOrder);
    }

    abstract class Presenter extends BasePresenter<View, Model> {
        public abstract void cartSettlement(String accountId, String ids, String addressId);

        public abstract void selectUseCoupons(String accountId, String userCouponIds, String goodId, String totalMoney, String companyId);

        public abstract void cartForOrder(String accountId, String ids, String addressId);
    }
}
